using Avalonia;
using Avalonia.Controls.Primitives;
using Avalonia.Controls.Templates;

namespace HandyControl.Controls;

public class Card : HeaderedContentControl
{
    public static readonly StyledProperty<object> FooterProperty =
        AvaloniaProperty.Register<Card, object>(
            nameof(Footer));

    public object Footer
    {
        get => GetValue(FooterProperty);
        set => SetValue(FooterProperty, value);
    }

    public static readonly StyledProperty<IDataTemplate> FooterTemplateProperty =
        AvaloniaProperty.Register<Card, IDataTemplate>(
            nameof(FooterTemplate));

    public IDataTemplate FooterTemplate
    {
        get => GetValue(FooterTemplateProperty);
        set => SetValue(FooterTemplateProperty, value);
    }

    public static readonly StyledProperty<IDataTemplate> HeaderTemplateSelectorProperty =
        AvaloniaProperty.Register<Card, IDataTemplate>(
            nameof(HeaderTemplateSelector));

    public IDataTemplate HeaderTemplateSelector
    {
        get => GetValue(HeaderTemplateSelectorProperty);
        set => SetValue(HeaderTemplateSelectorProperty, value);
    }
}